package TestsDesignPatternFactory;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import DesignPatternFactory.Hardware;
import DesignPatternFactory.Produit;
import DesignPatternFactory.Software;

public class TestHardware {
	
	protected Produit h ; 
	private static final double delta = 1e-15;

	@Before
	public void setUp() {
		h = new Hardware("Ipad", "2008", 587.0) ;
	}
	
	@Test
	public void testGetDenomination()
	{
		assertSame(("Ipad"), h.getDenomination());
	}

	@Test
	public void testGetPrix()
	{
		assertEquals(587.0, h.getPrix(), delta);
		
	}
	
	public void testGetAnneeCreation()
	{
		assertEquals("2008", h.getAnneeCreation());
		
	}
}
